import { NoSkinCellRenderer } from "../../common/item/NoSkinCellRenderer";
import { GlobalClass } from "../../../../../com/mui/core/GlobalClass";
import { CrossGuildWarRewardData } from "../data/CrossGuildWarRewardData";
import { ItemData } from "../../../resource/info/ItemData";
import { ObjCreate } from "../../common/ObjCreate";
import { ImagesConst } from "../../../resource/ImagesConst";
import { BaseItem } from "../../common/BaseItem";
import { GlobalStyle } from "../../../../common/global/GlobalStyle";
import { GTextFiled } from "../../../../../com/mui/controls/GTextFiled";
//class CrossGuildWarRewardRender
    
    export  class CrossGuildWarRewardRender extends NoSkinCellRenderer
    {
        constructor()
        {
            super();
            return;
        }

        public /* override */ set data(arg1: Object)
        {
            if (arg1 == null) 
            {
                return;
            }
            this._bm.bitmapData = GlobalClass.getBitmapData(CrossGuildWarRewardData(arg1).imgName);
            var loc1=new ItemData(CrossGuildWarRewardData(arg1).rewardCode);
            this._item.itemData = loc1;
            this._txtName.htmlText = loc1.htmlName;
            return;
        }

        protected /* override */ createChildren(): void
        {
            super.createChildren();
            ObjCreate.createBg(0, 0, 120, 112, this, ImagesConst.DisabledBg);
            this._bm = ObjCreate.createBitmap(null, 4, 3, this);
            ObjCreate.createBg(40, 42, 36, 36, this, ImagesConst.ItemBg);
            this._item = new BaseItem();
            this._item.x = 42;
            this._item.y = 44;
            this._item.width = 33;
            this._item.height = 33;
            this._item.isDragAble = false;
            this._item.isDropAble = false;
            this._item.isShowLock = true;
            this.addChild(this._item);
            var loc1=GlobalStyle.textFormat1;
            loc1.align = flash.text.TextFormatAlign.CENTER;
            this._txtName = ObjCreate.createGTextField("", 0, 91, 120, 20, this, loc1);
            return;
        }

        /* internal */ /* var */_bm: Object /* flash.display.Bitmap */;

        /* internal */ /* var */_txtName: GTextFiled;

        /* internal */ /* var */_item: BaseItem;
    }
